<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib prefix="se" uri="/WEB-INF/serviceTypeTag.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>main</title>
<link rel="stylesheet" rev="stylesheet"
	href="${pageContext.request.contextPath}/css/admin/style-admin.css"
	type="text/css" media="all" />
<script type="text/javascript" src="${pageContext.request.contextPath}/ckeditor/ckeditor.js"></script>
	
<script src="${pageContext.request.contextPath}/js/jquery.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.ui.draggable.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.alerts.js" type="text/javascript"></script>
<link href="${pageContext.request.contextPath}/css/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />

<script type="text/javascript">
window.onload = function(){
	CKEDITOR.replace('serviceContent');
	
	 
	$("#fom").submit( function(){
		if($("#serviceId").val()==""){
				jAlert('请输入增值业务ID', '消息');
				$("#serviceId").focus();
				return false;
		}else if(isNaN($("#serviceId").val())){
			jAlert('值业务的编码只能是数字', '消息');
			$("#serviceId").focus();
			return false;
		}
		if($("#serviceName").val()==""){
			jAlert('请输入增值业务名称', '消息');
			$("#serviceName").focus();
			return false;
		}
		if($("#serviceType").val()=="0"){
			jAlert('请选择增值业务服务类别', '消息');
			$("#serviceType").focus();
			return false;
		}
		if($("#serviceClassify").val()=="0"){
			jAlert('请选择增值业务功能类别', '消息');
			$("#serviceClassify").focus();
			return false;
		}
		if($("#value").val()==""){
			jAlert('请输入增值业务的价格', '消息');
			$("#value").focus();
			return false;
		}else if(isNaN($("#value").val())){
			jAlert('值业务的价格只能是数字', '消息');
			$("#value").focus();
			return false;
		}
		if($("#serviceDesc").val()==""){
			jAlert('请输入增值业务的简述', '消息');
			$("#serviceDesc").focus();
			return false;
		}
		if($("#spname").val()==""){
			jAlert('请输入增值业务提供商', '消息');
			$("#spname").focus();
			return false;
		}
		if($("#smallImage").val()==""){
			jAlert('请选择增值业务的缩略图', '消息');
			$("#smallImage").focus();
			return false;
		}else{
			var name = $("#smallImage").val();
			name = name.substring(name.lastIndexOf("."));
			if(name!=".jpg"&&name!=".png"&&name!=".gif"){
				jAlert('增值业务的缩略图只能是JPG.PNG.GIF格式的缩略图', '消息');
				$("#smallImage").focus();
				return false;
			}
		}
		if($("#bigImage").val()==""){
			jAlert('请选择增值业务的LOGO', '消息');
			$("#bigImage").focus();
			return false;
		}else{
			var name = $("#bigImage").val();
			name = name.substring(name.lastIndexOf("."));
			if(name!=".jpg"&&name!=".png"&&name!=".gif"){
				jAlert('增值业务的LOGO只能是JPG.PNG.GIF格式的缩略图', '消息');
				$("#bigImage").focus();
				return false;
			}
		}
		if($("#flash").val()==""){
			jAlert('请选择增值业务的体验FLASH', '消息');
			$("#flash").focus();
			return false;
		}else{
			var name = $("#flash").val();
			name = name.substring(name.lastIndexOf("."));
			if(name!=".swf"){
				jAlert('增值业务的体验FLASH只能是SWF格式的FLASH', '消息');
				$("#flash").focus();
				return false;
			}
		}
		if($("#grade").val()==""){
			jAlert('请选择增值业务的推荐星级', '消息');
			$("#grade").focus();
			return false;
		}

		return true;
	});
}

</script>


<style type="text/css">
<!--
.atten {
	font-size: 12px;
	font-weight: normal;
	color: #F00;
}
-->
</style>
</head>

<body class="ContentBody">
<form action="saveService?saveType=save" method="post" name="fom" id="fom"
	enctype="multipart/form-data">
<div class="MainDiv">
<table width="99%" border="0" cellpadding="0" cellspacing="0"
	class="CContent">
	<tr>
		<th class="tablestyle_title">增值业务管理</th>
	</tr>
	<tr>
		<td class="CPanel">
		<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
			<tr>
				<td align="left"><input type="submit" value="保存" class="button" />

				<input type="reset" name="Submit2" value="返回" class="button"
					onclick="window.history.go(-1);" /> &nbsp;&nbsp;&nbsp;<a
					href="service.jsp">新增增值业务</a> <a href="toOperationService.jsp">编辑增值业务</a>

				</td>
			</tr>

			<tr align="center">
				<td class="TablePanel"></td>
			</tr>
			<tr>
				<TD width="100%">
				<fieldset style="height: 100%;"><legend>增加增值业务(带*的为必填)</legend>
				<table border="0" cellpadding="2" cellspacing="1"
					style="width: 100%">

					<tr>
						<td nowrap align="right" width="13%">增值业务代码：</td>
						<td width="32%">&nbsp;<input type="text" maxlength="30" 
							name="serviceId" id="serviceId" /><span style="color:black">*　 请输入数字类型的增值业务代码</span></td>
					</tr>
					<tr>
						<td nowrap align="right" width="13%">增值编码类别:</td>
						<td width="32%">&nbsp;<select name="serviceCodeType">
							<option value="P">产品类型</option>
							<option value="C">套餐类型</option>
						</select></td>
					</tr>
					<tr>
						<td nowrap align="right" width="13%">增值业务名称:</td>
						<td width="32%">&nbsp;<input type="text" maxlength="30" 
							name="serviceName" id="serviceName"><span style="color:black">*</span></td>
					</tr>
					<tr>
						<td nowrap align="right" width="13%">增值服务类别:</td>
						<td width="32%">&nbsp;<se:showServiceType/>
						</td>
					</tr>
					<tr>
						<td nowrap align="right" width="13%">增值功能类别:</td>
						<td width="32%">&nbsp;<se:showServiceClassify/></td>
					</tr>
					<tr>
						<td nowrap align="right" width="13%">增值业务价格:</td>
						<td width="32%">&nbsp;<input type="text" maxlength="4" size="4"
							name="value" id="value">元<span style="color:black">*　请输入整数类型的增值业务价格</span></td>
					</tr>
					<tr>
						<td nowrap align="right" width="13%">增值业务描述:</td>
						<td width="32%">&nbsp;<input type="text" maxlength="30" 
							name="serviceDesc" id="serviceDesc"><span style="color:black">*</span></td>
					</tr>
					<tr>
						<td nowrap align="right" width="13%">增值业务服务提供商:</td>
						<td width="32%">&nbsp;<input type="text" name="spName" id="spname"><span style="color:black">*</span></td>
					</tr>
				</table>
				<br />
				</fieldset>
				<fieldset style="height: 100%;"><legend>增值业务其它信息</legend>
				<table border="0" cellpadding="2" cellspacing="1"
					style="width: 100%">
					<tr>
						<td nowrap align="right" width="13%">增值业务缩略图:</td>
						<td width="32%">&nbsp;<input type="file" name="file" id="smallImage">
							<span style="color:black">*　 请选择后缀名为.jpg .gif .png格式的图片(尺寸为90*65)</span></td>
					</tr>
					<tr>
						<td nowrap align="right" width="13%">增值业务LOGO:</td>
						<td width="32%">&nbsp;<input type="file" name="file" id="bigImage">
						<span style="color:black">*　 请选择后缀名为.jpg .gif .png格式的图片(尺寸为198*177)</span></td>
					</tr>
					<tr>
						<td nowrap align="right" width="13%">增值业务体验FLASH:</td>
						<td width="32%">&nbsp;<input type="file" name="file" id="flash">
						<span style="color:black">*　 请选择后缀名为.swf格式的FLASH</span></td>
					</tr>
					
					<tr>
						<td nowrap align="right" width="13%">增值业务推荐星级:</td>
						<td width="32%">&nbsp;<select name="serviceCodeGrade"  id="grade">
							<option value="1">&nbsp;1&nbsp;</option>
							<option value="2">&nbsp;2&nbsp;</option>
							<option value="3">&nbsp;3&nbsp;</option>
							<option value="4">&nbsp;4&nbsp;</option>
							<option value="5">&nbsp;5&nbsp;</option>
						</select>星</td>
					</tr>
        		<tr>
						<td nowrap align="right" width="13%">增值业务详细描述:</td>
						<td width="32%">
							<textarea rows="3" cols="5" name="serviceContent"></textarea>
						</td>
				</tr>
					
				</table>
				</fieldset>
				</TD>
			</TR>
		</TABLE>
		</td>
	</tr>
	<TR>
		<TD colspan="2" align="center" height="50px"><input type="submit"
			value="保存" class="button" /> <input type="button" name="Submit2"
			value="返回" class="button" onclick="window.history.go(-1);" /></TD>
	</TR>
</TABLE>




</div>
</form>
</body>
</html>